package com.dinpay.plugin.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.TextView;

public class TestMerchantPayResultActivity extends Activity
{
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903042);
    TextView localTextView = (TextView)findViewById(2131230738);
    Bundle localBundle = getIntent().getExtras();
    if (localBundle != null)
    {
      String str1 = localBundle.getString("xml");
      try
      {
        int i = str1.indexOf("<trade_status>");
        int j = str1.indexOf("</trade_status>");
        String str2 = str1.substring(i + "<trade_status>".length(), j);
        if ("SUCCESS".equals(str2))
        {
          localTextView.setText("支付结果：支付成功");
          return;
        }
        if ("UNPAY".equals(str2))
        {
          localTextView.setText("支付结果：未支付");
          return;
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return;
      }
      localTextView.setText("支付结果：支付失败");
    }
  }

  public boolean onKeyUp(int paramInt, KeyEvent paramKeyEvent)
  {
    if (paramInt == 4)
      finish();
    return super.onKeyUp(paramInt, paramKeyEvent);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.dinpay.plugin.activity.TestMerchantPayResultActivity
 * JD-Core Version:    0.6.2
 */